﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace LdtJudge.DataEngine.Model.XMLConfigModel.CircumsatanModel
{
    [Serializable]
    [XmlRootAttribute("root", IsNullable = false)]
    public class CircumsatanModel
    {

        [XmlElementAttribute("casetype", IsNullable = false)]
        public List<CasetypeModel> casetypeModelList = new List<CasetypeModel>();
    }
    [Serializable]
    [XmlRootAttribute("doctype", IsNullable = false)]
    public class DocType
    {
        [XmlAttribute("code")]
        public string Code { get; set; }

        [XmlElementAttribute("paragraph", IsNullable = false)]
        public List<ParagraphModel> paragraphModelList = new List<ParagraphModel>();

        [XmlAttribute("lawmergepath")]
        public string lawmergepath { get; set; }

        /// <summary>
        /// 否定句判断正则编号
        /// </summary>
        [XmlAttribute("denyRegCode")]
        public string DenyRegCode { get; set; }


    }
    [Serializable]
    [XmlRootAttribute("casetype", IsNullable = false)]
    public class CasetypeModel
    {

        [XmlAttribute("code")]
        public string Code { get; set; }
        [XmlAttribute("laworgpath")]
        public string laworgpath { get; set; }

        [XmlElementAttribute("doctype", IsNullable = false)]
        public List<DocType> docTypeList = new List<DocType>();

        [XmlElementAttribute("casecause", IsNullable = false)]
        public List<CirCasecause> CirCasecauseList = new List<CirCasecause>();

        /// <summary>
        /// 拆局正则
        /// </summary>
        [XmlAttribute("sentenceRegcode")]
        public string SentenceRegcode { get; set; }
    }
    [Serializable]
    [XmlRootAttribute("paragraph", IsNullable = false)]
    public class ParagraphModel
    {
        [XmlAttribute("code")]
        public string Code { get; set; }

        [XmlAttribute("ch_name")]
        public string Ch_name { get; set; }

        [XmlAttribute("type")]
        public string Type { get; set; }

        [XmlAttribute("lawpath")]
        public string lawpath { get; set; }

        [XmlAttribute("nodename")]
        public string nodename { get; set; }

        [XmlAttribute("field")]
        public string field { get; set; }

        [XmlElementAttribute("path", IsNullable = false)]
        public List<PathModel> pathModelList = new List<PathModel>();

        [XmlAttribute("causecode")]
        public string causecode { get; set; }
        [XmlAttribute("isml")]
        public string isml { get; set; }

        /// <summary>
        /// 关键词判定正则编号
        /// </summary>
        [XmlAttribute("determineRegCode")]
        public string DetermineRegCode { get; set; }
    }
    [Serializable]
    [XmlRootAttribute("Path", IsNullable = false)]
    public class PathModel
    {
        [XmlAttribute("type")]
        public string Type { get; set; }

        [XmlAttribute("value")]
        public string value { get; set; }

        [XmlElementAttribute("paragraph", IsNullable = false)]
        public List<ParagraphModel> paragraphModelList = new List<ParagraphModel>();
    }
    [Serializable]
    [XmlRootAttribute("root", IsNullable = false)]
    public class CauseCircumsatanModel
    {
        [XmlElementAttribute("casetype", IsNullable = false)]
        public List<CasetypeModel> casetypeModelList = new List<CasetypeModel>();
    }
    [Serializable]
    [XmlRootAttribute("casecause", IsNullable = false)]
    public class CirCasecause
    {
        [XmlAttribute("code")]
        public string Code { get; set; }

        [XmlElementAttribute("doctype", IsNullable = false)]
        public List<DocType> docTypeList = new List<DocType>();
    }


}
